package drawArrow;

import java.io.File;
import java.io.IOException;

/**
 * @projectName: code-snippet
 * @className: DrawArrow
 * @description:
 * @author: JLONG
 * @date: 2024/8/21 17:39
 * @version: 1.0
 */
public class DrawArrow {
    public static void main(String[] args) throws IOException {
        File folder = new File("/Users/jlong/IdeaProjects/testImages");
        traverseFolder(folder);

    }

    public static void traverseFolder(File folder){
        if( folder == null || !folder.exists() || !folder.isDirectory()){
            System.out.println("文件夹路径不符合要求，请重新确认！");
        }
        assert folder != null;
        File[] files = folder.listFiles();
        if(files == null){
            return;
        }
        for(File file : files){
            if(file.isDirectory()){
                traverseFolder(file);
            }else {
                if(file.getName().endsWith("WHITE.png")){
                    JfreeChart.drawArrow(file);
                }
            }
        }

    }
}
